﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="Joyintech.Web.inpiao365.PhenixTicket.login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>影票365-用户登录</title>
    <link rel="stylesheet" type="text/css" href="/UserCenter/usercss/reglog.css" />
    <script src="/js/jquery-1.4.2.min.js" type="text/javascript"></script>
        <script src="/js/jbox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <link href="/js/jbox/jbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            font-size: 12px;
            font-family: 宋体;
        }
        *
        {
            margin: 0;
        }
    </style>
</head>
<body>
    <script type="text/javascript" language="javascript">
        function checkLogin() {
            var userName = $("#txtUserName").val();
            var userPwd = $("#txtPwd").val();
            if (userName == "用户名|邮箱|手机号" || userName == "") {
                $("#divMsg").html("用户名不能为空！");
                $("#divMsg").show();
                return false;
            }
            else if (userPwd == "") {
                $("#divMsg").html("密码不能为空！");
                $("#divMsg").show();
                return false;
            }
            else {
                $("#divMsg").hide();
            }
        }

        function hideMsgDiv() {
            $("#hei30").hide();
        }
        function checkUserName() {
            var userName = $("#txtUserName").val();

            if (userName == "用户名|邮箱|手机号" || userName == "") {
                alert("用户名不能为空！");
                $("#linkbGetback").attr("href", "#");
            }
            else {
                $("#linkbGetback").attr("href", "javascript:__doPostBack('linkbGetback','')");
            }
        } 
    </script>
    <form id="form1" runat="server">
    <div class="maincon" align="center">
        <div align="center">
            <div class="logbox" style="margin: 0px">
                <h2>
                    登录影票365，看大片</h2>
                <div id="divMsg" class="onError" style="display: none;">
                    您输入的账户名和密码不匹配，请重新输入。</div>
                <div class="clear">
                </div>
                <p class="userhei">
                    <label for="txtUserName">
                        登录:</label><asp:TextBox ID="txtUserName" runat="server" CssClass="colorbb" MaxLength="50"
                            onblur="if(this.value=='')this.value='用户名|邮箱|手机号';this.className='colorbb';"
                            onfocus="if(this.value=='用户名|邮箱|手机号')this.value='';this.className='color333 onfusbox';"
                            value="用户名|邮箱|手机号"></asp:TextBox>
                </p>
                <p>
                    <label for="txtPwd">
                        密码:</label><asp:TextBox ID="txtPwd" runat="server" TextMode="Password" MaxLength="50"
                            CssClass="colorbb" onblur="this.className='';" onfocus="this.className='onfusbox';"></asp:TextBox>
                </p>
                <p class="lgsave color7d">
                    <label for="ckbsavecookie">
                        <asp:CheckBox ID="CheckBox1" runat="server" Text="保存我的登录用户" Checked="True" /></label></p>
                <p class="lgsave lgbtn" style="height: 70px">
                   <img alt="" src="/UserCenter/images/logbtn.jpg" style=" border:0px; cursor:pointer" onclick="login();"/>
                    <a onclick="checkUserName();" id="linkbGetback" class="forpass" href="javascript:__doPostBack('linkbGetback','')">忘记密码？</a></p>
                <div class="noreg">
                    <p>
                        您还没有影票365的账号, <a href="/UserCenter/Register.aspx" target="_blank" title="点击这里去注册">立即注册</a></p>
                </div>
                <div class="shengdalink">
                </div>
            </div>
        </div>
    </div>
    </form>
    
    <script type="text/javascript">
        function login() {
            $.ajax({
                type: 'POST',
                url: 'longin.ashx',
                data: {
                    "name": $("#txtUserName").val(),
                    "psw": $("#txtPwd").val()
                },
                success: function (msg) {
                    if (msg == "") {
                        parent.document.getElementById("btnok").click();
                        top.$.jBox.close("login");
                    }
                    else {
                    
                        $.jBox.alert(msg, '错误提示', { width: 170, height: 120 });
                       
                         

                    }
                }
            })
        }
    </script>
</body>
</html>
